package com.nest4cloud.nest.account.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 账单表
 *
 * @author nest
 * @date 2024-11-24 21:37:24
 */
@Data
@TableName("acc_accounts")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "账单表")
public class AccountsEntity extends Model<AccountsEntity> {


	/**
	* 账户ID
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description="账户ID")
    private Integer id;

	/**
	* 用户ID
	*/
    @Schema(description="用户ID")
    private Long userId;

	/**
	* 账户名称
	*/
    @Schema(description="账户名称")
    private String accountName;

	/**
	* 账户号码
	*/
    @Schema(description="账户号码")
    private String accountNumber;

	/**
	* 账户类型ID
	*/
    @Schema(description="账户类型ID")
    private Long accountTypeId;

	/**
	* 账户余额
	*/
    @Schema(description="账户余额")
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "#0.00")
    private BigDecimal balance;

	/**
	* 创建者
	*/
	@TableField(fill = FieldFill.INSERT)
    @Schema(description="创建者")
    private String createBy;

	/**
	* 创建时间
	*/
	@TableField(fill = FieldFill.INSERT)
    @Schema(description="创建时间")
    private LocalDateTime createTime;

	/**
	* 最后修改者
	*/
	@TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description="最后修改者")
    private String updateBy;

	/**
	* 最后修改时间
	*/
	@TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description="最后修改时间")
    private LocalDateTime updateTime;

	/**
	* 删除标志：0-正常，1-已删除
	*/
    @TableLogic
	@TableField(fill = FieldFill.INSERT)
    @Schema(description="删除标志：0-正常，1-已删除")
    private String delFlag;
}
